<?php
/**
 * Created by PhpStorm.
 * User: lwl
 * Date: 2021/05/20
 * Time: 12:45 PM
 */
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\User\AuthController;
use App\Http\Controllers\User\CategoryController;
use App\Http\Controllers\User\FriendController;
use App\Http\Controllers\User\SiteController;
use App\Http\Controllers\User\SocialController;
use App\Http\Controllers\User\FocusController;
use App\Http\Controllers\User\PostController;

Route::group(["namespace" => "Api",'prefix'=>'user'], function () {
    Route::group(["middleware" => ["jwt.users"]], function () {
        Route::post('logout', [AuthController::class,'logout']);//登出
        Route::get('info', [AuthController::class,'info']);//我的信息
        Route::put('password', [AuthController::class,'password']);//更新密码
        Route::put('info', [AuthController::class,'editInfo']);//更新个人信息
    });
    Route::post('login', [AuthController::class,'login']);//登录
    Route::get('categories', [CategoryController::class,'categories']);//分类
    Route::get('friends', [FriendController::class,'friends']);//友情链接
    Route::get('sites', [SiteController::class,'sites']);//站点
    Route::get('socials', [SocialController::class,'socials']);//社交
    Route::get('focuses', [FocusController::class,'focuses']);//焦点
    Route::get('post/lists', [PostController::class,'lists']);//文章列表
    Route::get('post/show', [PostController::class,'show']);//文章详情


//    Route::get('post/Post/{post}', [PostController::class,'show']);//文章详情






    Route::get('product', [\App\Http\Controllers\QueueController::class,'product']);
    Route::get('consumer', [\App\Http\Controllers\QueueController::class,'consumer']);
    Route::get('adopt', [\App\Http\Controllers\QueueController::class,'adopt']);
});
